import { createBrowserRouter } from "react-router-dom";
import Layout from "../pages/Layout";
import Home from "../pages/Home";
import About from "../pages/About";
import News from "../pages/News";
import App from "../App";

const routes = createBrowserRouter([
  {
    path: '/',
    element: <App />,
    children: [
      {
        index: true,      // 默认二级路由
        element: <Home />
      },
      {
        path: '/about',
        element: <About />
      },
      {
        path: '/news',
        element: <News />
      },
    ]
  }
])

export default routes